package com.hqd.ch03.v16.aop.framework.aspectj;

import com.hqd.ch03.v16.aop.framework.MethodBeforeAdvice;

import javax.annotation.Nullable;
import java.lang.reflect.Method;

public class AspectJMethodBeforeAdvice extends AbstractAspectJAdvice implements MethodBeforeAdvice {
    public AspectJMethodBeforeAdvice(AspectJExpressionPointcut pointcut, Method aspectJAdviceMethod, Object aspect) {
        super(pointcut, aspectJAdviceMethod, aspect);
    }

    @Override
    public void before(Method method, Object[] args, @Nullable Object target) throws Throwable {
        invokeAdviceMethod(method);
    }
}
